GXGetShapeCap
You can use theGXGetShapeCap
function to retrieve cap information from the style object of a particular shape.
gxCapRecord *GXGetShapeCap(gxShape source, gxCapRecord *cap);
source
- A refernce to the shape whose cap information you want to retrieve.
cap
- A pointer to a
gxCapRecord
structure. On return, this structure contains the cap information for the source shape.- function result
- A copy of the
gxCapRecord
structure associated with the source
shape's style object.DESCRIPTION
TheGXGetShapeCap
function returns as its function result, and in thecap
parameter, agxCapRecord
structure containing the cap information for the style object associated with the shape specified by the source parameter.This function creates new shapes to encapsulate the start cap and end cap geometries, and places references to these shapes in the
startCap
andendCap
fields of the returnedgxCapRecord
structure. You should dispose of these shapes when you no longer need them.Since this function copies the cap information from the source shape's style, you may make changes to the
gxCapRecord
structure returned by this function without affecting the source shape's caps. If you want to change the cap information for the source shape, you must use theGXSetShapeCap
function.SPECIAL CONSIDERATIONS
Unless an error results, theGXGetShapeCap
function creates shapes; you are responsible for disposing of these shapes when you no longer need them. See Inside Macintosh: QuickDraw GX Objects for information about disposing of QuickDraw GX objects.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil parameter_is_nil SEE ALSO
For a discussion of start and end caps, see "Caps" on page 3-23.For examples of adding caps to a shape, see "Adding Caps to a Shape" on page 3-57 and "Adding Standard Caps to a Shape" on page 3-59.
For a discussion of the
gxCapRecord
structure and a description of what types of shapes you can use as cap shapes, see "The Cap Structure" on page 3-99.To retrieve cap information from a style object, use the
GXGetStyleCap
function, which is described on page 3-124. To specify cap information for a style object, use theGXSetStyleCap
function, which is described on page 3-125.To specify cap information for a style object associated with a particular shape, use the
GXSetShapeCap
function, which is described in the next section.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help